<!--
 * @Author: YuA
 * @Date: 2021-08-09 22:17:01
 * @LastEditTime: 2021-08-21 17:37:18
 * @FilePath: \index\src\components\content\goods\GoodsListItem.vue
-->
<template>
  <div class="goods-item">
    <div class="goods-info"></div>
  </div>
</template>

<script>
export default {
  name: "GoodsListItem",
  props: {
    goodsItem: {
      type: Object,
      default() {
        return [];
      }
    }
  }
};
</script>

<style lang="scss">
.goods-item {
  padding-bottom: 40px;
  position: relative;
  width: 48%;
  img {
    width: 100%;
    border-radius: 5px;
  }
}

.goods-info {
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  overflow: hidden;
  font-size: 12px;
  text-align: center;

  p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
  }
}

.price {
  color: red;
  margin-left: 20px;
}

.collect {
  position: relative;
  margin-left: 20px;

  &::before {
    content: "⭐";
    position: absolute;
    left: -15px;
    top: -1px;
    width: 14px;
    height: 14px;
  }
}
</style>
